package com.wx.chapter10.final_.innerclass;

/**
 * ClassName:InnerClassExercise01
 * Package :com.wx.chapter10.innerclass
 * Description :
 *
 * @Author : coder_mu
 * @Create : 2023/6/11 - 18:28
 */
public class InnerClassExercise01 {
    public static void main(String[] args) {
        f1(new IL() {//接口作为形参传入
            @Override
            public void show() {
                System.out.println("这是一副名画~~...");
            }
        });

        f1(new Picture());
    }

    public static void f1(IL il) {
        il.show();
    }
}

interface IL {
    void show();
}

class Picture implements IL {
    @Override
    public void show() {
        System.out.println("这是一幅画");
    }
}